Skip to content

Re-enable tests on Jazzy for Windows#1435

Merged
minggangw merged 16 commits intoRobotWebTools:developfrom
minggangw:enable-tests-on-jazzy
Mar 17, 2026
Merged

Re-enable tests on Jazzy for Windows#1435
minggangw merged 16 commits intoRobotWebTools:developfrom
minggangw:enable-tests-on-jazzy

Conversation

@minggangw
Copy link
Copy Markdown
Member

@minggangw minggangw commented Mar 16, 2026

Replaces the legacy setup-ros-based Windows CI with a unified pixi-based workflow covering Jazzy, Kilted, and Rolling. Removes Humble from Windows CI (EOL distro, setup-ros unmaintained). Tests run only on Jazzy; Kilted and Rolling are build-only. Fixes an intermittent Electron test hang on Linux CI caused by async app.quit() racing with process.exit(). Adds targeted Windows-only test skips for six test cases with platform-specific portability issues.

CI workflow changes:

  • .github/workflows/windows-build-and-test.yml — Replaced setup-ros + c:\dev\ install path with prefix-dev/setup-pixi@v0.9.4 + pixi-managed C:\pixi_ws layout. Distro matrix changed from [humble, jazzy, kilted, rolling] to [jazzy, kilted, rolling] with per-distro release zip URLs via include. Tests gated by matrix.run_tests (true only for Jazzy). Removed stale Foxy-era comment about CycloneDDS workaround.
  • .github/workflows/windows-pr-test.yml — Job renamed build-and-testpixi-build.
  • .github/workflows/windows-push-test.yml — Job renamed build-and-testpixi-build.

Electron test fix:

  • test/electron/test_usability.js — Replaced app.quit() + process.exit() with app.exit(code) for immediate synchronous termination, preventing orphan GPU/utility processes from keeping xvfb-run pipes open. Added testDone guard to prevent double-fire of subscription callback and timeout. Hoisted interval declaration above subscription creation to avoid temporal dead zone. Added clearInterval(interval) in the success path.

Targeted Windows test skips:

  • test/test-native-loader.js — Skip customFallbackLoader attempts to require exact match if exists on Windows (test overrides process.platform to linux and probes Ubuntu-specific prebuild paths).
  • test/test-rate.js — Skip rate sleep accuracy test, 1000 hz for 3 seconds on Windows (Windows timer resolution ~15ms cannot meet 1kHz threshold).
  • test/test-rosidl-message-generator.js — Skip Generate message at runtime on Windows (shells through bash + local_setup.sh). Skip Testing mrpt_msgs/msg/GraphSlamAgents on Windows (mrpt_msgs unavailable in Windows Jazzy environment).
  • test/test-serialization.js — Skip std_msgs/msg/MultiArrayDimension serialization round-trip on Windows (inconsistent deserialization behavior).
  • test/test-type-description-service.js — Skip Test type description service configured by parameter and Test start_type_description_service parameter value on Windows (ROS CLI ros2 param commands brittle/hanging; main service test unaffected).

Fix: #1436

Copilot AI review requested due to automatic review settings March 16, 2026 06:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Windows CI workflow to handle ROS 2 Jazzy by downloading a specific prebuilt Windows archive and adjusting the build/test steps accordingly.

Changes:

  • Adds a matrix include entry to supply a Jazzy-specific ros_binary_url.
  • Installs 7-Zip/wget on Jazzy jobs and downloads/extracts the Jazzy Windows binary zip.
  • Gates npm test to run only on Jazzy and switches the test environment setup call.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +25
- rolling
include:
- ros_distribution: jazzy
ros_binary_url: https://github.com/ros2/ros2/releases/download/release-jazzy-20260128/ros2-jazzy-20260128-windows-release-amd64.zip
Comment on lines 66 to +71
- name: Test rclnodejs
if: ${{ matrix.ros_distribution == 'jazzy' }}
shell: cmd
run: |
set RMW_IMPLEMENTATION=rmw_fastrtps_cpp
call "c:\dev\${{ matrix.ros_distribution }}\ros2-windows\setup.bat"
call "c:\dev\jazzy\ros2-windows\local_setup.bat"
npm test
run: |
set RMW_IMPLEMENTATION=rmw_fastrtps_cpp
call "c:\dev\${{ matrix.ros_distribution }}\ros2-windows\setup.bat"
call "c:\dev\jazzy\ros2-windows\local_setup.bat"
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 16, 2026

Coverage Status

coverage: 85.981%. remained the same
when pulling 491ac42 on minggangw:enable-tests-on-jazzy
into d78ed38 on RobotWebTools:develop.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s Windows CI setup to provision ROS 2 via Pixi, and adjusts several tests to avoid Windows-specific failures/flakiness (plus a small reliability tweak in the Electron usability test).

Changes:

  • Skip a handful of tests (or specific cases) when running on win32.
  • Refine the Electron usability test flow to prevent repeated shutdown/exit paths.
  • Replace the Windows reusable workflow’s ROS setup with a Pixi-based install flow and rename the calling jobs accordingly.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/test-type-description-service.js Skips ROS 2 CLI parameter-based tests on Windows.
test/test-serialization.js Skips one serialization test case on Windows.
test/test-rosidl-message-generator.js Skips runtime message generation tests on Windows.
test/test-rate.js Skips high-frequency sleep accuracy test on Windows.
test/test-native-loader.js Skips one NativeLoader test on Windows.
test/electron/test_usability.js Adds guards/cleanup to avoid duplicate completion paths and stops publishing after success.
.github/workflows/windows-push-test.yml Renames the reusable-workflow job key.
.github/workflows/windows-pr-test.yml Renames the reusable-workflow job key.
.github/workflows/windows-build-and-test.yml Switches Windows CI to Pixi + ZIP-based ROS 2 install; conditionally runs tests per distro.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 23 to +31
(msg) => {
if (msg.data === 'Hello from Electron') {
if (!testDone && msg.data === 'Hello from Electron') {
testDone = true;
console.log(
'Successfully received message in Electron environment.'
);
clearInterval(interval);
rclnodejs.shutdown();
app.quit();
process.exit(0);
app.exit(0);
Comment on lines 67 to 74
it('customFallbackLoader attempts to require exact match if exists', function () {
if (process.platform === 'win32') {
this.skip();
}

Object.defineProperty(process, 'platform', { value: 'linux' });
Object.defineProperty(process, 'arch', { value: 'x64' });
process.env.ROS_DISTRO = 'humble';
Comment on lines +44 to +48
shell: powershell
run: |
irm -useb https://pixi.sh/install.ps1 | iex
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","User") + ";" + [System.Environment]::GetEnvironmentVariable("Path","Machine")
Write-Host "Pixi installed at: $(where.exe pixi)"
Comment on lines +22 to +31
include:
- ros_distribution: jazzy
ros_zip_url: "https://github.com/ros2/ros2/releases/download/release-jazzy-20260128/ros2-jazzy-20260128-windows-release-amd64.zip"
run_tests: true
- ros_distribution: kilted
ros_zip_url: "https://github.com/ros2/ros2/releases/download/release-kilted-20250728/ros2-kilted-20250728-windows-release-amd64.zip"
run_tests: false
- ros_distribution: rolling
ros_zip_url: "https://github.com/ros2/ros2/releases/download/release-rolling-nightlies/ros2-rolling-nightly-windows-amd64.zip"
run_tests: false
@minggangw minggangw merged commit e71e427 into RobotWebTools:develop Mar 17, 2026
16 checks passed
minggangw added a commit that referenced this pull request Mar 17, 2026
Replaces the legacy `setup-ros`-based Windows CI with a unified pixi-based workflow covering Jazzy, Kilted, and Rolling. Removes Humble from Windows CI (EOL distro, `setup-ros` unmaintained). Tests run only on Jazzy; Kilted and Rolling are build-only. Fixes an intermittent Electron test hang on Linux CI caused by async `app.quit()` racing with `process.exit()`. Adds targeted Windows-only test skips for six test cases with platform-specific portability issues.

**CI workflow changes:**

- `.github/workflows/windows-build-and-test.yml` — Replaced `setup-ros` + `c:\dev\` install path with `prefix-dev/setup-pixi@v0.9.4` + pixi-managed `C:\pixi_ws` layout. Distro matrix changed from `[humble, jazzy, kilted, rolling]` to `[jazzy, kilted, rolling]` with per-distro release zip URLs via `include`. Tests gated by `matrix.run_tests` (true only for Jazzy). Removed stale Foxy-era comment about CycloneDDS workaround.
- `.github/workflows/windows-pr-test.yml` — Job renamed `build-and-test` → `pixi-build`.
- `.github/workflows/windows-push-test.yml` — Job renamed `build-and-test` → `pixi-build`.

**Electron test fix:**

- `test/electron/test_usability.js` — Replaced `app.quit()` + `process.exit()` with `app.exit(code)` for immediate synchronous termination, preventing orphan GPU/utility processes from keeping `xvfb-run` pipes open. Added `testDone` guard to prevent double-fire of subscription callback and timeout. Hoisted `interval` declaration above subscription creation to avoid temporal dead zone. Added `clearInterval(interval)` in the success path.

**Targeted Windows test skips:**

- `test/test-native-loader.js` — Skip `customFallbackLoader attempts to require exact match if exists` on Windows (test overrides `process.platform` to `linux` and probes Ubuntu-specific prebuild paths).
- `test/test-rate.js` — Skip `rate sleep accuracy test, 1000 hz for 3 seconds` on Windows (Windows timer resolution ~15ms cannot meet 1kHz threshold).
- `test/test-rosidl-message-generator.js` — Skip `Generate message at runtime` on Windows (shells through `bash` + `local_setup.sh`). Skip `Testing mrpt_msgs/msg/GraphSlamAgents` on Windows (`mrpt_msgs` unavailable in Windows Jazzy environment).
- `test/test-serialization.js` — Skip `std_msgs/msg/MultiArrayDimension` serialization round-trip on Windows (inconsistent deserialization behavior).
- `test/test-type-description-service.js` — Skip `Test type description service configured by parameter` and `Test start_type_description_service parameter value` on Windows (ROS CLI `ros2 param` commands brittle/hanging; main service test unaffected).

Fix: #1436
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-enable testing with Jazzy release on Windows platform

3 participants